<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
<title></title>
<script type="text/javascript">
function abrirWord(){
	var myApp = new ActiveXObject("Word.Application");
	var strFile = 'file:'+document.forms[0].archivo.value;
    if (myApp != null){
      myApp.Visible = true;
      myApp.Documents.Open(strFile);
    }
}
function realizaAccion(field){
	if(field.name == 'btnAprobar'){
		document.forms[0].action='Informe.do?operacion=aprobartrabajo';
		document.forms[0].submit();
	}
	if(field.name == 'btnDesaprobar'){
		document.forms[0].action='Informe.do?operacion=desaprobartrabajo';
		document.forms[0].submit();
	}	
}

</script>
</head>
<body >
<form id="form1" name="form1" encType=multipart/form-data  method="post" action="PagoServlet">
  <c:set var="infor" scope="page" value="${sessionScope.b_informecomp}"/>
  <table border="2" cellpadding="8" width="800">
    <tr bgcolor="#FF6600">
      <td colspan="3" class="HeaderColor">
       
        <h4><fmt:message key="cu052.titAreaEval" /></h4>
        
      </td>
    </tr>
	<tr bgcolor="#C0C0C0">
      <td colspan="3" class="HeaderColor">
        <fmt:message key="cu052.titDtCont" />    
      </td>
    </tr>
    <tr >
      <td bgcolor="#DDDDDD" width="12%" nowrap class="LabelColor" style="text-align: right">
        <label for="nomcomp"><fmt:message key="cu052.nomComp" />  </label>
      </td>
      <td bgcolor="#DDDDDD" colspan="2" class="TitleColor">
         <input readonly="readonly" type="text" id="nomcomp" name="nomcomp" size="80" value="${infor.strNombreContri} ${infor.strApePaterContri} ${infor.strApeMaterContri}">
        <br>
      </td>
      </tr>
      <tr >
      <td bgcolor="#DDDDDD" width="12%" nowrap class="LabelColor" style="text-align: right">
        <label for="dir"> <fmt:message key="cu052.dirCont" /> </label>
      </td>
      <td bgcolor="#DDDDDD" colspan="2" class="TitleColor">
         <input readonly="readonly" type="text" id="dir" name="dir" size="80" value="ILO">
        <br>
      </td>
      </tr>
	<tr bgcolor="#C0C0C0">
      <td colspan="3" class="HeaderColor">
       <fmt:message key="cu052.titDatosInf" />   
      </td>
    </tr>
    <tr >
      <td bgcolor="#DDDDDD" width="12%" nowrap class="LabelColor" style="text-align: right">
        <label for="estinf"><fmt:message key="cu052.estaAvInf" /></label>
      </td>
      <td bgcolor="#DDDDDD" width="50%" class="TitleColor">
        <select name="estinf">
        <option value="${infor.strEstaAvacInforme}">${infor.strEstaAvacInforme}</option>
        </select>
        <br>
      </td>
      <td bgcolor="#DDDDDD" width="50%" class="TitleColor">
        <input type="button" id="btnRevInf" name="btnRevInf" size="40" value=<fmt:message key="cu052.btnRevi" /> onclick="abrirWord();">
        <br>
      </td>
    </tr>
    <tr  style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="archivo"> <fmt:message key="cu052.arRut" /></label>
      </td>
      <td bgcolor="#DDDDDD" width="50%" class="TitleColor">
        <input readonly="readonly" type="text" id="archivo" name="archivo" size="40" value="${infor.strEscritoInforme}">
      </td>
      <td bgcolor="#DDDDDD" width="50%" class="TitleColor">
        <input type="button" id="btnAprobar" name="btnAprobar" size="40" value=<fmt:message key="cu052.btnApro" /> onclick="realizaAccion(this);">
        <br>
      </td>
    </tr>
    <tr bgcolor="#C0C0C0">
      <td style="text-align: left;" class="LabelColor" colspan="2"> 
        <label for="estlic"><fmt:message key="cu052.estApInf" /></label>
      	<select name="estapinf">
      	<option value="${infor.strEstadoAprobInforme}">${infor.strEstadoAprobInforme}</option>
      	</select>
      </td>
      <td bgcolor="#DDDDDD" width="50%" class="TitleColor" >
	  	<input type="button" id="btnDesaprobar" name="btnDesaprobar" value=<fmt:message key="cu052.btnDesapro" /> onclick="realizaAccion(this);">
	  </td>
    </tr>
    <tr >
      <td bgcolor="#DDDDDD" width="12%" nowrap class="LabelColor" style="text-align: right">
        <label for="observacion"> <fmt:message key="cu052.titOobs" /> </label>
      </td>
      <td bgcolor="#DDDDDD" colspan="2" class="TitleColor">
        <textarea readonly="readonly" id="observacion" name="observacion" cols="45" rows="5">${infor.strObservaciones}</textarea>
        <br>
      </td>
    </tr>
    <tr bgcolor="#C0C0C0">
      <td colspan="3" class="HeaderColor">
        DETALLE DE LA LICENCIA    
      </td>
    </tr>
    <tr bgcolor="#DDDDDD" style="vertical-align: top">
      <td style="text-align: right" class="LabelColor" > 
        <label for="uso"><fmt:message key="cu052.usoEdi" /> </label>
      </td>
      <td bgcolor="#DDDDDD" colspan="2" class="TitleColor">
      	<select name="uso">
      	<c:if test="${sessionScope.l_usosEdific != null}">
      	<c:forEach var="usos" items="${sessionScope.l_usosEdific}">
      		<c:if test="${usos.intCodUsoEdif == infor.intUsoEdificacion}">
      			<option value="${usos.intCodUsoEdif}">${usos.strDescripcion}</option>
      		</c:if>
      	</c:forEach>
      	</c:if>
      	</select>
      </td>
    </tr>
    <tr >
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="ubicacion"><fmt:message key="cu052.ubiEdi" /> </label>
      </td>
      <td bgcolor="#DDDDDD" colspan="2" class="TitleColor">
        <input readonly="readonly" type="text" id="ubicacion" name="ubicacion" size="80" value="${infor.strUbicacion}">
      </td>
    </tr>
    <tr style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="areat"><fmt:message key="cu052.areTerr" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="5%" class="TitleColor">
        <input readonly="readonly" type="text" id="areat" name="areat" value="${infor.dbAreaTerrenoTotal}">
 		<label for="npisos"><fmt:message key="cu052.numPisos" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="30%" class="TitleColor">
        <select name="npisos">
        	<option value="${infor.intNroPisosTotales}">${infor.intNroPisosTotales}</option>
        </select>
      </td>
    </tr>
    <tr style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="areacp"><fmt:message key="cu052.aPrPi" /> </label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="5%" class="TitleColor">
        <input readonly="readonly" type="text" id="areacp" name="areacp" value="${infor.dbAreaConstruida1pm2}">
        <label for="areact"><fmt:message key="cu052.aTrPi" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="30%" class="TitleColor">
        <input readonly="readonly" type="text" id="areact" name="areact" value="${infor.dbAreaConstruida3pm2}">
      </td>
    </tr>
    <tr style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="areacs"><fmt:message key="cu052.aSgPi" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="5%" class="TitleColor">
        <input readonly="readonly" type="text" id="areacs" name="areacs" value="${infor.dbAreaConstruida2pm2}">
        <label for="areacc"><fmt:message key="cu052.aCrPi" /></label>
      </td>
      <td align="left"" bgcolor="#DDDDDD" width="30%" class="TitleColor">
        <input readonly="readonly" type="text" id="areacc" name="areacc" value="${infor.dbAreaConstruida4pm2}">
      </td>
    </tr>
    <tr style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="areatt"><fmt:message key="cu052.aTotTec" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" colspan="2" class="TitleColor">
        <input readonly="readonly" type="text" id="areatt" name="areatt" value="${infor.dbAreaTotalTechada}">
      </td>
    </tr>
    <tr style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="cca"> <fmt:message key="cu052.codColArq" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="5%" class="TitleColor">
        <input readonly="readonly" type="text" id="cca" name="cca" value="${infor.strCodColArqui}">
        <label for="arqres"><fmt:message key="cu052.nomArqOb" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="30%" class="TitleColor">
        <input readonly="readonly" type="text" id="arqres" name="arqres" value="${infor.strNombreArquitec}">
      </td>
    </tr>
    <tr style="vertical-align: top">
      <td bgcolor="#DDDDDD" style="text-align: right" class="LabelColor">
        <label for="vigmes"><fmt:message key="cu052.vigeMss" /></label>
      </td>
      <td align="left" bgcolor="#DDDDDD" width="50%" class="TitleColor">
        <select name="vigmes">
        	<option value="${infor.intVigenciaObraMeses}">${infor.intVigenciaObraMeses}</option>
        </select>
      </td>
      <td valign="middle" align="right" bgcolor="#DDDDDD" width="50%" class="TitleColor">
        <label><fmt:message key="cu052.opcio" /></label>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
    